import React, {Component} from 'react';
import {createStackNavigator} from 'react-navigation';
import CardStackStyleInterpolator from "react-navigation/src/views/StackView/StackViewStyleInterpolator";
import LoginScreen from './src/js/screen/LoginScreen';
import MainScreen from './src/js/screen/MainScreen';

import {YellowBox,Text} from 'react-native';
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader']);

// import React from 'react';
import AppNavigator from './src/AppNavigator';

// export default class App extends  React.Component{
//
//     render() {
//         return (
//             <AppNavigator/>
//         );
//     }
//
//     // render() {
//     //     return (
//     //        <Text>HAHHHAHA</Text>
//     //     );
//     // }
// }


export default createStackNavigator(
    {
        Login: {
            screen: LoginScreen,
            navigationOptions: {
                gesturesEnabled: false,
            }
        },
        Main: {
            screen: MainScreen,
            navigationOptions: {
                gesturesEnabled: false,
            }
        },
        // Camera: CameraScreen,
        // Setting: SettingScreen,
        // SettingLogin: SettingLoginScreen,
    },
    {
        initialRouteName: 'Login',
        navigationOptions: {
            header: null,
            animationEnabled: true,
            gesturesEnabled: true,
        },
        transitionConfig: () => ({
            screenInterpolator: CardStackStyleInterpolator.forFade, // 统一安卓和苹果页面跳转的动画
        }),
    }
)
